import { createSlice } from '@reduxjs/toolkit'

export const imgSlice = createSlice({
  name: 'img',
  initialState: {
    imgSlice:[]
  },
  reducers: {
    set_img(state,{payload,type}){
        state.imgSlice=payload
    }
  }
})
// 每个 case reducer 函数会生成对应的 Action creators
export const { set_img } = imgSlice.actions

export default imgSlice.reducer